# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=gtkimageview

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.6.4
pkgrel=1
pkgdesc="Simple image viewer widget for GTK2 (mingw-w64)"
arch=('any')
url="https://github.com/GNOME/gtkimageview"
license=("LGPL2.1")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
depends=("${MINGW_PACKAGE_PREFIX}-gtk2")
options=('strip' 'staticlibs')
source=("http://trac.bjourne.webfactional.com/chrome/common/releases/${_realname}-${pkgver}.tar.gz")
md5sums=('8346b42012a82d5fe6f1c151bae346c3')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  export lt_cv_deplibs_check_method='pass_all'
  rm -rf "${srcdir}/build-${MINGW_CHOST}"
  mkdir "${srcdir}/build-${MINGW_CHOST}"
  cd "${srcdir}/build-${MINGW_CHOST}"
  ../${_realname}-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST} \
    --target=${MINGW_CHOST}
  make
}

package() {
  cd "${srcdir}/build-${MINGW_CHOST}"
  make DESTDIR="${pkgdir}" install

}
